package com.xian.service;

import com.xian.dao.ProductMapper;
import com.xian.pojo.Product;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class ProductServiceImpl implements ProductService{
    @Autowired
    private ProductMapper productMapper;
    public List<Product> queryAllProduct() {
        return productMapper.queryAllProduct();
    }

    public int saveProduct(Product product) {
        return productMapper.saveProduct(product);
    }
}
